package com.abing.template.enums;

public enum PayChannelEnum {

    PayChannelEnum_01("01","aliPayCallbackTemplate"),
    PayChannelEnum_02("02","unionPayCallbackTemplate");
    private String name;
    private String beanId;
     PayChannelEnum(String name, String beanId) {
        this.name = name;
        this.beanId = beanId;
    }
    public static String getName(String beanId) {
        for (PayChannelEnum code : PayChannelEnum.values()) {
            if (code.getBeanId().equals(beanId)) {
                return code.name;
            }
        }
        return null;
    }

    public static String getBeanId(String name) {
        for (PayChannelEnum code : PayChannelEnum.values()) {
            if (code.getName().equals(name)) {
                return code.beanId;
            }
        }
        return null;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBeanId() {
        return beanId;
    }

    public void setBeanId(String beanId) {
        this.beanId = beanId;
    }
}
